$.ajax ({
    url : 'http://localhost:8888/api/swipers',
    success : function (res) {
        console.log(res);
        var htmlStr = template('lunbotu1',res);
        $('#lunbotu').html(htmlStr);
        layui.use('carousel', function() {
            // 轮播模块
            let carousel = layui.carousel;
            // 轮播交互
            carousel.render({
              elem: '#kr_carousel',
              width: 720,
              height: 300,
              interval: 3000
            });
          });
    }
})
